import http from "@/api/axios";

//我的问题件列表
export const getMyProblemPiecePageApi = (data: ApprovalManagement.SearchForm) => {
  return http({
    method: "post",
    url: `base/biz/bizProblemPiece/myProblemPiecePage`,
    data
  });
};

//问题件详情
export const getProblemPieceInfoApi = (params: { id: string }) => {
  return http({
    method: "get",
    url: `base/biz/bizProblemPiece/getProblemPieceInfo`,
    params
  });
};

//撤销问题件
export const undoProblemPieceApi = (params: { id: string }) => {
  return http({
    method: "get",
    url: `base/biz/bizProblemPiece/undoProblemPiece`,
    params
  });
};

//查看窗口/确认或驳回
export const confirmationApi = (data: { id: string; state: number }) => {
  return http({
    method: "post",
    url: `base/biz/bizProblemPiece/confirmation`,
    data
  });
};

//审批中心-审批
export const approvalPieceApi = (data: { id: number; state: number; file?: string; remark: string; isCloseCase?: number; companyProportion?: number; bizProportion?: number }) => {
  return http({
    method: "post",
    url: `base/biz/bizProblemPiece/approval`,
    data
  });
};
